/*
 * Bitmap2D.h
 *
 *  Created on: 29.04.2011
 *      Author: Tavin
 */

#include "boolean.h"

#ifndef BITMAP2D_H_
#define BITMAP2D_H_


	typedef struct{
		uint16_t  x;
		uint16_t  y;
	} Dimension2D_t;


	typedef struct{
		Dimension2D_t position;
		Dimension2D_t displaySize;
	} Pixel2D_t;



void Bitmap2D_fill(uint16_t * adress, uint16_t color, uint16_t size);
void Bitmap2D_setPixel(Pixel2D_t pixel, uint16_t * addres, uint16_t color);
uint16_t Bitmap2D_getPixel(Pixel2D_t pixel,uint16_t * addres);

void Bitmap2D_mirrorX(uint16_t * addres, Dimension2D_t *size);
void Bitmap2D_mirrorY(uint16_t * addres, Dimension2D_t *size);

void Bitmap2D_not(uint16_t * addres, uint16_t size);
void Bitmap2D_min(uint16_t * destinationAddres,uint16_t * connectivAddres, Dimension2D_t * destinationSize, Dimension2D_t * connectivSize);
void Bitmap2D_max(uint16_t * destinationAddres,uint16_t * connectivAddres, Dimension2D_t * destinationSize, Dimension2D_t * connectivSize);

boolean Bitmap2D_print5x5Char(uint16_t * addres, Dimension2D_t *origin,Dimension2D_t *bitmapSize,uint8_t index,uint16_t color);
boolean Bitmap2D_print8x8Char(uint16_t * addres, Dimension2D_t *origin,Dimension2D_t *bitmapSize,uint8_t index,uint16_t color);

void Bitmap2D_drawLine(int8_t x,int8_t y,int8_t dx,int8_t dy,uint16_t * addres,Dimension2D_t *size,uint16_t color );
/*
 * private static native void _rotate(int axis, int angle, short[] data);

private static native void _not(short[] data);
private static native void _and(short[] DestinationData,short[] sourceData);
private static native void _or(short[] DestinationData,short[] sourceData);
 */
#endif /* BITMAP2D_H_ */




